import { request } from '@boeyo/portal';

/**
 * 新增jopens服务器
 * @ss.hasPermi('jopensInfo:add')
 */
export const add = (data) => {
  return request({
    url: '/jopensInfo/add',
    method: 'POST',
    data,
  });
};

/**
 * 删除jopens服务器
 * @ss.hasPermi('jopensInfo:delete')
 */
export const jopensDelete = (ids) => {
  return request({
    url: `/jopensInfo/delete/${ids}`,
    method: 'DELETE',
  });
};

/**
 * 详情查询
 * @ss.hasPermi('jopensInfo:detail')
 */
export const jopensDetail = (id) => {
  return request({
    url: `/jopensInfo/queryById/${id}`,
    method: 'GET',
  });
};

/**
 * 修改jopens服务器
 * @ss.hasPermi('jopensInfo:update')
 */
export const jopensUpdate = (data) => {
  return request({
    url: '/jopensInfo/update',
    method: 'PUT',
    data,
  });
};

/**
 * jopens服务器查询列表数据
 * @ss.hasPermi('jopensInfo:list')
 */
export const list = (params) => {
  return request({
    url: '/jopensInfo/list',
    method: 'POST',
    params,
  });
};

/**
 * jopens调整
 * null
 */
export const jopensInfoUpdate = (data, method: string) => {
  return request({
    url: '/jopensInfo/update',
    method,
    data,
  });
};
